<?php
/**
 * Created by PhpStorm.
 * User: yangyou
 * Date: 2018/12/18 0018
 * Time: 17:09
 */

namespace app\index\model;


class Column extends Base
{
    /**
     * Author:yang you
     * Time:2018-12-2 10:27:51
     * Describe:头部栏目列表
     * @param string $keyword
     * @param string $cate
     * @param string $layct
     * @return int|string
     */
    public function columnList($substation_id = "1"){
        return $this
            ->where(function ($q)use ($substation_id){
                if(!empty($substation_id)){
                    //分类查找
                    $q->where("substation_id",$substation_id);
                }
            })
            ->where("delete",0)
            ->where("is_display",1)
            ->orderRaw("sort desc")
            ->select();
    }

}